import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import com.alibaba.fastjson.JSON;

/**
 * Created by IntelliJ IDEA.
 * User: chen
 * Date: 2024/1/9
 */
public class TreeNodeTest {

    // 文件目录相对路径列子
    private static String[] fileList = new String[]{
            "dist/favicon.ico",
            "dist/index.html",
            "dist/static/css/app.46c00deb.css",
            "dist/static/css/chunk-vendors.b80cec6e.css",
            "dist/static/css/dashboard.65e4cda8.css",
            "dist/static/css/home.c7bb3066.css",
            "dist/static/css/login.89e00d4a.css",
            "dist/static/css/table.cf6aa91f.css",
            "dist/static/fonts/element-icons.535877f5.woff",
            "dist/static/fonts/element-icons.732389de.ttf",
            "dist/static/img/img.146655c9.jpg",
            "dist/static/img/login-bg.e2134055.jpg",
            "dist/static/js/app.db875c52.js",
            "dist/static/js/chunk-vendors.31d72191.js",
            "dist/static/js/dashboard.988c89e7.js",
            "dist/static/js/home.482bfd24.js",
            "dist/static/js/login.78ac76b0.js",
            "dist/static/js/table.eac1b16a.js",
            "dist/table.json"
    };

    public static void main(String args[]) throws IOException {
        List<Menu> collect = ListUtil.getFilePathTree(Arrays.asList(fileList));
        System.out.println("-------转json输出结果-------");
        System.out.println(JSON.toJSON(collect));
    }

}
